import React, {
  Component
} from 'react'
import {
  Link
} from 'react-router'
import styles from './index.scss'

export default class Header extends Component {
  state = {
    autoCity: '广州',
    searchData: {
      cityLink: '/',
      cityName: '广州',
      searchLink: '/',
      messageLink: '/',
      messageBool: true
    }
  }

  componentWillMount(){
    this.props.onRequestPosts()
    console.log(window.userInfo)
  }

  render() {
    const {
      autoCity,
      searchData
    } = this.state

    return (
      <div className={styles.root}>

        <Link
          to={searchData.searchLink}
          className={`ver-center ${styles.center}`}
        >
          <i className={`i-4019 ${styles.search}`} />
          <input className={styles.searchInput} type="text" placeholder="输入房间号码直接进入"/>
        </Link>

        <button
          className={`${styles.btn} ${styles.right}`}
        >
          进入
        </button>
      </div>
    )
  }
}